package net.hn.hnms.biz.safety.location.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * 智呈物联 pan'sx
 * 2022/9/1 16:27
 * 1.0 version
 */
@Entity
@Table(name = "dwd_jxry_now_personnelinfo", schema = "jxry", catalog = "huaneng-safety")
@ApiModel("井下人员实时数据")
public class JxryNowPersonnelinfoEntity {
    private String staffCode;
    private String staffName;
    private String flagBit;
    @ApiModelProperty("入井时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "Asia/Shanghai"
    )
    private Timestamp inTime;
    private Timestamp outTime;
    private String areaCode;
    @ApiModelProperty("到达时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm",
            timezone = "Asia/Shanghai"
    )
    private Timestamp areaInTime;
    private String stationCode;
    @ApiModelProperty("分站进入时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "Asia/Shanghai"
    )
    private Timestamp stationInTime;
    private String peopleWay;
    private Timestamp createTime;
    private String laborOrganization;
    private String distanceBaseStation;
    private String workingCondition;
    private String mineLeader;
    private String specialPersonnel;
    @ApiModelProperty("数据时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "Asia/Shanghai"
    )
    private Timestamp dataTime;
    private Long currentNumber;
    @ApiModelProperty("当前位置")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm",
            timezone = "Asia/Shanghai"
    )
    private String substationLocation;
    @ApiModelProperty("工种")
//    @Transient
    private String duty;
    @ApiModelProperty("部门名")
//    @Transient
    private String dept;
//    @Transient
    public String getDuty() {
        return duty;
    }

    public void setDuty(String duty) {
        this.duty = duty;
    }
//    @Transient
    public String getDept() {
        return dept;
    }

    public void setDept(String dept) {
        this.dept = dept;
    }

    @Id
    private Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "staff_code")
    public String getStaffCode() {
        return staffCode;
    }

    public void setStaffCode(String staffCode) {
        this.staffCode = staffCode;
    }

    @Basic
    @Column(name = "staff_name")
    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    @Basic
    @Column(name = "flag_bit")
    public String getFlagBit() {
        return flagBit;
    }

    public void setFlagBit(String flagBit) {
        this.flagBit = flagBit;
    }

    @Basic
    @Column(name = "in_time")
    public Timestamp getInTime() {
        return inTime;
    }

    public void setInTime(Timestamp inTime) {
        this.inTime = inTime;
    }

    @Basic
    @Column(name = "out_time")
    public Timestamp getOutTime() {
        return outTime;
    }

    public void setOutTime(Timestamp outTime) {
        this.outTime = outTime;
    }

    @Basic
    @Column(name = "area_code")
    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    @Basic
    @Column(name = "area_in_time")
    public Timestamp getAreaInTime() {
        return areaInTime;
    }

    public void setAreaInTime(Timestamp areaInTime) {
        this.areaInTime = areaInTime;
    }

    @Basic
    @Column(name = "station_code")
    public String getStationCode() {
        return stationCode;
    }

    public void setStationCode(String stationCode) {
        this.stationCode = stationCode;
    }

    @Basic
    @Column(name = "station_in_time")
    public Timestamp getStationInTime() {
        return stationInTime;
    }

    public void setStationInTime(Timestamp stationInTime) {
        this.stationInTime = stationInTime;
    }

    @Basic
    @Column(name = "people_way")
    public String getPeopleWay() {
        return peopleWay;
    }

    public void setPeopleWay(String peopleWay) {
        this.peopleWay = peopleWay;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "labor_organization")
    public String getLaborOrganization() {
        return laborOrganization;
    }

    public void setLaborOrganization(String laborOrganization) {
        this.laborOrganization = laborOrganization;
    }

    @Basic
    @Column(name = "distance_base_station")
    public String getDistanceBaseStation() {
        return distanceBaseStation;
    }

    public void setDistanceBaseStation(String distanceBaseStation) {
        this.distanceBaseStation = distanceBaseStation;
    }

    @Basic
    @Column(name = "working_condition")
    public String getWorkingCondition() {
        return workingCondition;
    }

    public void setWorkingCondition(String workingCondition) {
        this.workingCondition = workingCondition;
    }

    @Basic
    @Column(name = "mine_leader")
    public String getMineLeader() {
        return mineLeader;
    }

    public void setMineLeader(String mineLeader) {
        this.mineLeader = mineLeader;
    }

    @Basic
    @Column(name = "special_personnel")
    public String getSpecialPersonnel() {
        return specialPersonnel;
    }

    public void setSpecialPersonnel(String specialPersonnel) {
        this.specialPersonnel = specialPersonnel;
    }

    @Basic
    @Column(name = "data_time")
    public Timestamp getDataTime() {
        return dataTime;
    }

    public void setDataTime(Timestamp dataTime) {
        this.dataTime = dataTime;
    }

    @Basic
    @Column(name = "current_number")
    public Long getCurrentNumber() {
        return currentNumber;
    }

    public void setCurrentNumber(Long currentNumber) {
        this.currentNumber = currentNumber;
    }

    @Basic
    @Column(name = "substation_location")
    public String getSubstationLocation() {
        return substationLocation;
    }

    public void setSubstationLocation(String substationLocation) {
        this.substationLocation = substationLocation;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        JxryNowPersonnelinfoEntity that = (JxryNowPersonnelinfoEntity) o;
        return Objects.equals(staffCode, that.staffCode) &&
                Objects.equals(staffName, that.staffName) &&
                Objects.equals(flagBit, that.flagBit) &&
                Objects.equals(inTime, that.inTime) &&
                Objects.equals(outTime, that.outTime) &&
                Objects.equals(areaCode, that.areaCode) &&
                Objects.equals(areaInTime, that.areaInTime) &&
                Objects.equals(stationCode, that.stationCode) &&
                Objects.equals(stationInTime, that.stationInTime) &&
                Objects.equals(peopleWay, that.peopleWay) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(laborOrganization, that.laborOrganization) &&
                Objects.equals(distanceBaseStation, that.distanceBaseStation) &&
                Objects.equals(workingCondition, that.workingCondition) &&
                Objects.equals(mineLeader, that.mineLeader) &&
                Objects.equals(specialPersonnel, that.specialPersonnel) &&
                Objects.equals(dataTime, that.dataTime) &&
                Objects.equals(currentNumber, that.currentNumber) &&
                Objects.equals(substationLocation, that.substationLocation);
    }

    @Override
    public int hashCode() {
        return Objects.hash(staffCode, staffName, flagBit, inTime, outTime, areaCode, areaInTime, stationCode, stationInTime, peopleWay, createTime, laborOrganization, distanceBaseStation, workingCondition, mineLeader, specialPersonnel, dataTime, currentNumber, substationLocation);
    }
}
